package 无限级分类;

import java.util.List;
import java.util.ArrayList;

public class Category {
	@Override
	public String toString() {
		return "Category [id=" + id + ", pid=" + pid + ", name=" + name + ", child=" + child + "]";
	}
	// 生成构造方法
	public Category(Integer id, Integer pid, String name) {
		super();
		this.id = id;
		this.pid = pid;
		this.name = name;
	}
	Integer id;
	Integer pid;
	String name;
	List<Category> child = new ArrayList<>();
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getPid() {
		return pid;
	}
	public void setPid(Integer pid) {
		this.pid = pid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public List<Category> getChild() {
		return child;
	}
	public void setChild(List<Category> child) {
		this.child = child;
	}
}
